﻿namespace BlamanticUI.Components;

/// <summary>
/// Represents the container to show the dynamic component by service.
/// </summary>
public class BlamanticUIContainer : ComponentBase
{
    /// <summary>
    /// Renders the component to the supplied <see cref="T:Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder" />.
    /// </summary>
    /// <param name="builder">A <see cref="T:Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder" /> that will receive the render output.</param>
    protected override void BuildRenderTree(RenderTreeBuilder builder)
    {
        builder.AddContent(0, child =>
        {
            child.CreateComponent<DialogContainer>(0);
            child.CreateComponent<ToastContainer>(1);
        });
    }
}
